package com.foreknow.oppExer1.exer9;

/**
 * @author shkstart
 * @create 2021-07-28 14:51
 */
public class Manager extends Employee {
//    private String name ;  //姓名
    private double salary;  //薪资
    private double balance;  //余额
    private double bonus;//奖金

    public Manager() {
    }

    public Manager(String name, double balance) {
        super(name,balance);
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus=bonus;
    }

//    @Override
//    public String getName() {
//        return name;
//    }
//
//    @Override
//    public void setName(String name) {
//        this.name = name;
//    }

    @Override
    public double getSalary() {
        return salary;
    }

    @Override
    public void setSalary(double salary) {
        this.salary = salary;
    }

    @Override
    public double getBalance() {
        return balance+=salary+this.getBonus();
    }

    @Override
    public void setBalance(double balance) {
        this.balance = balance;
    }
}
